import React,{useState,useEffect} from 'react'
import styles from '../css分支/My.module.css'
import { Arrow, ChatO, Circle, SettingO } from '@react-vant/icons';
import { Grid, Image } from 'react-vant'
import { useNavigate } from 'react-router-dom';
import axios from 'axios';
export default function My() {
  const navigate = useNavigate()
  const [list, setlist] = useState({})
  const getList = async () => {
      let res = await axios.get('http://localhost:3000/xzx/business_user')
      setlist(res.data.data)
  }
  useEffect(() => {
      getList()
  }, [])
  return (
    <div className={styles.main}>
      <div className={styles.head}>
        <div className={styles.head1}>
          <div className={styles.head_fen}>
            <ChatO style={{ fontSize: '0.3rem', color: 'white' }} />
            <p style={{ fontSize: '0.25rem', color: 'white' }}>我的</p>
            <SettingO style={{ fontSize: '0.3rem', color: 'white' }} onClick={()=>{navigate('/shezhi')}}/>
          </div>
        </div>
        <div className={styles.head2} onClick={()=>{navigate('/xinxi')}}>
          <img src="/imgs/touxiang.png" alt="" style={{ width: '0.6rem', height: '0.6rem', borderRadius: '50%' }} />
          <p style={{ color: 'white', marginRight: '0.1rem' }}>默林石墨肠粉早餐店
            (凤凰广场店)
            <br />
            <span>账号：+{list.phone}</span>
          </p>
          <Arrow style={{ color: 'white' }} />
        </div>
      </div>
      <div className={styles.body}>
        <div className={styles.body_fen} onClick={()=>{navigate('/gonggao')}}>
          <img src="/imgs/my1.png" alt="" style={{ width: '0.32rem', borderRadius: '50%' }} />
          <p style={{ marginRight: '2.3rem' }}>店铺公告</p>
          <Arrow style={{ color: '' }} />
        </div>
        <div className={styles.body_fen}>
          <img src="/imgs/my2.png" alt="" style={{ width: '0.32rem', borderRadius: '50%' }} />
          <p style={{ marginRight: '2.3rem' }}>店铺管理</p>
          <Arrow style={{ color: '' }} />
        </div>
        <div className={styles.body_fen} onClick={()=>{navigate('/huanjing')}}>
          <img src="/imgs/my3.png" alt="" style={{ width: '0.32rem', borderRadius: '50%' }} />
          <p style={{ marginRight: '2.3rem' }}>店铺店招</p>
          <Arrow style={{ color: '' }} />
        </div>
        <div className={styles.body_fen} onClick={()=>{navigate('/huanjing')}}>
          <img src="/imgs/my4.png" alt="" style={{ width: '0.32rem', borderRadius: '50%' }} />
          <p style={{ marginRight: '2.3rem' }}>门店环境</p>
          <Arrow style={{ color: '' }} />
        </div>
        <div className={styles.body_fen}>
          <img src="/imgs/my5.png" alt="" style={{ width: '0.32rem', borderRadius: '50%' }} />
          <p style={{ marginRight: '2.3rem' }}>到店自取</p>
          <Arrow style={{ color: '' }} />
        </div>
      </div>
      <div className={styles.body1}>
        <div className={styles.body_fen}>
          <img src="/imgs/m6.png" alt="" style={{ width: '0.32rem', borderRadius: '50%' }} />
          <p style={{ marginRight: '2.3rem' }}>资质信息</p>
          <Arrow style={{ color: '' }} />
        </div>
        <div className={styles.body_fen} onClick={()=>{navigate('/zhanghu')}}>
          <img src="/imgs/my7.png" alt="" style={{ width: '0.32rem', borderRadius: '50%' }} />
          <p style={{ marginRight: '2.3rem' }}>账户信息</p>
          <Arrow style={{ color: '' }} />
        </div>
      </div>
      <div className={styles.body2}>
        <div className={styles.body_fen}>
          <img src="/imgs/my8.png" alt="" style={{ width: '0.32rem', borderRadius: '50%' }} />
          <p style={{ marginRight: '2.3rem' }}>帮助中心</p>
          <Arrow style={{ color: '' }} />
        </div>
      </div>
    </div>
  )
}
